/*
 * File:   Player.h
 * Author: Elevator
 *
 * Created on July 14, 2013, 8:58 PM
 */

#ifndef DATA_PLAYER_H
#define DATA_PLAYER_H

#include <string>
#include "PlayerType.h"

namespace data {

	struct Player {
	public:
		Player(
			PlayerType type,
			std::string name,
			std::string creatureId ) :
		_type( type ),
		_name( name ),
		_creatureId( creatureId )
		{ }

		inline const std::string GetName( ) const { return _name; }
		inline void SetName( std::string name ) { _name = name; }

		inline const PlayerType GetType( ) const { return _type; }
		inline void SetType( PlayerType type ) { _type = type; }

		inline const std::string GetCreatureId( ) const { return _creatureId; }
		inline void SetCreatureId( std::string creatureId ) { _creatureId = creatureId; }

	private:
		PlayerType _type;
		std::string _name;
		std::string _creatureId;
	};

	inline bool operator == (const Player& a, const Player& b) {
		return
			a.GetName() == b.GetName() &&
			a.GetType() == b.GetType() &&
			a.GetCreatureId() == b.GetCreatureId();
	}
}
#endif	/* PLAYER_H */

